Skip to content

Conversation

@ioan-ghisoi-cko
Copy link
Collaborator

@ioan-ghisoi-cko ioan-ghisoi-cko commented Aug 12, 2025

Enable custom buttons and higher-level control without relying on SubmitButton; aligns with web parity and community feedback.

Changes:

  • New API: Frames exposes submitCard() via ref (forwardRef + useImperativeHandle); export FramesRef.
  • Docs: README example for programmatic submit.
  • Tests: Integration test covers ref-based submission and validation flow.
  • Types: submitCard(): Promise; add optional scheme_local to tokenized event.
  • Deps/Chore: Update Expo/Jest for improved tests.
  • Backwards compatibility: SubmitButton unchanged; event callbacks still used.

- Bump `expo` and `babel-preset-expo` versions in `package.json` and `package-lock.json`.
- Upgrade `jest-expo` to match the new `expo` version.
- Refactor integration tests for `Frames` component to mock network requests and improve validation checks.
- Remove redundant tests and ensure proper error handling for card tokenization.
- Add new tests for billing details and card validation events.
@codecov-commenter
Copy link

codecov-commenter commented Aug 12, 2025

Codecov Report

❌ Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.83%. Comparing base (caa8a1f) to head (defa076).

Files with missing lines Patch % Lines
src/utils/reducer.tsx 33.33% 0 Missing and 4 partials ⚠️
src/Frames.tsx 62.50% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #49       +/-   ##
===========================================
- Coverage   94.14%   68.83%   -25.31%     
===========================================
  Files          12       12               
  Lines         205      215       +10     
  Branches       57       62        +5     
===========================================
- Hits          193      148       -45     
- Misses          2       37       +35     
- Partials       10       30       +20     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Simplified state initialization in the Frames component by defining initialState separately.
- Updated TypeScript types to allow null values for card-related fields in FramesState.
- Changed autoCompleteType to autoComplete in CardNumber, Cvv, and ExpiryDate components for better compatibility.
- Ensured safe access to state properties by using nullish coalescing in input values.
- Refactored framesReducer to use a more explicit action parameter for better type safety.
- Updated the Frames component to support programmatic card submission via a ref using `submitCard()`.
- Modified README to include new usage example for programmatic submission.
- Adjusted integration tests to validate the new submission method and ensure proper tokenization.
- Updated public key in tests and other files for consistency.
@ioan-ghisoi-cko ioan-ghisoi-cko changed the title Update dependencies and improve integration tests Enable programmatic submission via Frames ref (submitCard); update docs, tests, and dependencies Aug 12, 2025
- Bumped package version from 1.2.2 to 1.2.3 in package.json.
- Improved formatting and structure of the GitHub Actions workflow in cd.yml for better readability and maintainability.
- Added conditional execution for the publish-npm job to ensure it only runs on pushes to the main branch.
@sonarqubecloud
Copy link

@ioan-ghisoi-cko ioan-ghisoi-cko merged commit 793ac34 into main Aug 13, 2025
6 checks passed
@ioan-ghisoi-cko ioan-ghisoi-cko deleted the sec-update branch August 13, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants